<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">

<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->

    <!-- BEGIN HEAD -->
        <head>
		<meta charset="utf-8"/>
		<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
		<meta content="width=device-width, initial-scale=1" name="viewport" />
		<meta content="" name="author" />
		<link rel="shortcut icon" href="/static/favicon.ico" />
		<title>更换绑定</title>
		<link href = "/static/pages/css/regist.css" rel="stylesheet" style="text/css"/>
	</head>
	
	<!--[if lt IE 9]>
	<script src="/static/global/plugins/respond.min.js"></script>
	<script src="/static/global/plugins/excanvas.min.js"></script> 
	<script src="/static/global/plugins/ie8.fix.min.js"></script> 
	<![endif]-->
	<script src="/static/global/plugins/require/require.js"></script>
	<script src="/static/require.config.js"></script>
	
    <!-- END HEAD -->
    <body class="regist" style="margin:0px;">
        <!-- BEGIN : LOGIN PAGE 5-1 -->
        <div class="user-regist-5" id="user-regist">
            <div class="row bs-reset">
                <div class="col-xs-12 regist-container bs-reset mt-regist-5-bsfix">
                    <div class="regist-content" style="margin-top:10%;padding:0 160px;">
                    
                        <h3>更换绑定</h3>
                        <p></p>
                    
                    	<!-- 手机绑定  -->
                        <form id="change_binding_mobile_form" action="/user/account/binding/change_binding_mobile" method="post" style="margin-top: 80px;" th:if="${type=='mobile'}">
                        	<input class="hidden" type="password" autocomplete="off">
                        	<div class="alert alert-danger display-hide">
                                <span>Enter any username and password. </span>
                            </div>
                            <div class="form-group" style="margin-bottom:30px">
                               	<div class="input-icon">
                               		<i class="icon-screen-smartphone"></i>
                                   	<input class="form-control placeholder-no-fix form-group" type="text" autocomplete="off" placeholder="手机号" name="mobile" value="">
                                </div> 
                            </div>
                            
                            <div class="form-group">
                              	<div class="row">
									<div class="col-xs-8">
										<div class="input-icon">
											<i class="icon-picture"></i>
                                   			<input class="form-control placeholder-no-fix form-group" type="text" autocomplete="off" placeholder="图片验证码" name="imageCode">
										</div>
									</div>
							        <div class="col-xs-4" style="text-align:right">
										<a>
											<img id="mobileCaptcha" alt="验证码" src="/code/image?width=60" data-src="/code/image?width=60" style="width:94.5px;height:35px;">
										</a>
	                                </div>
                                </div>
                            </div>
                            <div class="form-group" style="margin-bottom:0px;">
                              	<div class="row">
									<div class="col-xs-8">
										<div class="input-icon">
											<i class="icon-envelope"></i>
                                   			<input class="form-control placeholder-no-fix form-group" type="text" autocomplete="off" placeholder="短信验证码" name="smsCode">
										</div>
									</div>
							        <div class="col-xs-4">
							        	<button id="mobileSmsCodeBtn" type="button" class="btn green pull-right">获取验证码</button>
							        	<input type="hidden" id="mobileTotalSecond">
							        	<input type="hidden" id="mobileIntervalId">
							        </div>
                                </div> 
                            </div>
                            <div class="form-group">
								<div class="row">
									<div class="col-md-12">
		                            	<a target="_blank" href="http://www.baidu.com" class="pull-left" title="收不到短信怎么办？">收不到短信怎么办？</a>
		                            </div>
	                            </div>
                            </div>
                            <div class="form-actions">
                                <button id="change_binding_mobile_submit" type="button" class="btn green" style="width:100%;height:40px;">绑定</button>
                            </div>
                        </form>
                        
                        <!-- 邮箱绑定  -->
                        <form id="change_binding_email_form" action="/user/account/binding/change_binding_email" method="post" style="margin-top: 80px" th:if="${type=='email'}">
                        	<input class="hidden" type="password" autocomplete="off">
                        	<div class="alert alert-danger display-hide">
                                <span>Enter any username and password. </span>
                            </div>
                            <div class="form-group" style="margin-bottom:30px">
                               	<div class="input-icon">
                               		<i class="icon-envelope"></i>
                                   	<input class="form-control placeholder-no-fix form-group" type="text" autocomplete="off" placeholder="邮箱" name="email">
                                </div> 
                            </div>
                            
                            <div class="form-group">
                              	<div class="row">
									<div class="col-xs-8">
										<div class="input-icon">
											<i class="icon-picture"></i>
                                   			<input class="form-control placeholder-no-fix form-group" type="text" autocomplete="off" placeholder="图片验证码" name="imageCode">
										</div>
									</div>
							        <div class="col-xs-4" style="text-align:right">
										<a>
											<img id="emailCaptcha" alt="验证码" src="/code/image?width=60" data-src="/code/image?width=60" style="width:94.5px;height:35px;">
										</a>
	                                </div>
                                </div>
                            </div>
                            
                            <div class="form-actions">
                                <button id="change_binding_email_submit" type="button" class="btn green" style="width:100%;height:40px;">绑定</button>
                            </div>
                        </form>
                        
                        <!-- 邮箱绑定成功 -->
                        <form id="change_binding_email_form2" action="/user/account/binding/change_binding_email" method="post" style="margin-top: 80px;display:none" th:if="${type=='email'}">
                        	<div class="alert alert-success" id="email_form_success_tip">
                                <span>绑定成功，请到邮箱中进行激活！<br/>邮件发送至xxxxxx </span>
                            </div>
                            <div class="alert alert-danger" id="email_form_error_tip" style="display:none;">
                                <span></span>
                            </div>
                            <div class="form-group">
								<div class="row">
									<div class="col-md-12">
		                            	<a target="_blank" href="http://www.baidu.com" class="pull-left" title="收不到邮件怎么办？">收不到邮件怎么办？</a>
		                            </div>
	                            </div>
                            </div>
                            <div class="form-actions">
                                <input type="hidden" id = "emailSendTo"/>
                                <button id="emailToActiveBtn" type="button" class="btn green pull-right" style="width:100%;height:40px;">去邮箱验证</button>
                            </div>
                        </form>  
                    </div>
                </div>
            </div>
        </div>
    </body>
	<script type="text/javascript">
		// 创建app.js 调用helper
		require(['./static/pages/scripts/user/account/change_binding'], function(change_binding){
			change_binding.init();
		});
	</script>
</html>